port I/O_Kernel Interface

port I/O
<asm/io.h>
<linux/ioport.h>
1. I/O에 대한 가상주소 매핑
void* ioremap(unsigned long phys_addr, unsinged long size);
// physical
void* ioremap_nocache(unsigned long phys_addr, unsigned long size);
//
void iounmap(void* addr);
//
2. I/O memory 읽기
unsigned int ioread8(void* addr); //8
unsigned int ioread16(void* addr); //16
unsigned int ioread32(void* addr); //32
3. I/O memory 쓰기
void iowrite8(u8 value, void* addr); //8
void iowrite16(u16 value, void* addr); //16
void iowrite32(u32 value, void* addr); //32
4. I/O port 입출력(x86)
unsigned inb(unsigned port);
void outb(unsigned char byte, unsigned port);